package com.yu.controller;

import com.yu.domain.CommonResult;
import com.yu.domain.Order;
import com.yu.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author yutao
 * @date 2021/11/28 17:01
 */
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/order/create")
    public CommonResult create(Order order){
        orderService.createOrder(order);
        return new CommonResult(200,"创建成功");
    }

}
